/*
 * @Description: 交易类型-充值
 * @Author: yingying.fan
 * @Date: 2019-03-18 13:39:39
 * @Last Modified by: yingying.fan
 * @Last Modified time: 2019-03-18 14:26:43
 */
<script>
import BaseConsumeItem from './BaseConsumeItem'
import { WELFARE } from '../../../consumedetail/constants/TradeDetailType.js'
export default {
  name: 'ConsumeRechargeItem',
  extends: BaseConsumeItem,
  watch: {
    tradeDetailType(newValue, oldValue) {
      switch (newValue) {
        case WELFARE:
          this.iconUrl = require('../../assets/welfare.png')
          this.tradeText = '公司福利'
          break
        default:
          this.iconUrl = require('../../assets/recharge.png')
          this.tradeText = this.data.CARD_TYPE_NAME + '充值'
          break
      }
    }
  },
  methods: {
    // 交易失败
    parseWhenTradeFailure() {

    },
    // 交易退款
    parseWhenTradeRefund() {
      this.stateDesc = '已提现'
    },
    // 交易成功
    // parseWhenTradeSuccess() {
    //   this.payFeeDesc = '+' + this.payPrice
    // },
    // 交易中
    parseWhenTrading() {
      this.stateDesc = '待充值'
    }
  }
}
</script>
